<script setup lang="ts">
import FHeader from './components/FHeader.vue'
import FMenu from './components/FMenu.vue'
import FTagList from './components/FTagList.vue'

import { isCollapse, width1, width2 } from './components/collapse'
// import { ref } from "vue";
// defineOptions({ name: 'NewView' })
//
</script>

<template>
  <el-container>
    <el-header style="padding: 0">
      <FHeader />
    </el-header>
    <el-container>
      <!-- <el-aside width="250px"> -->
      <el-aside :width="isCollapse ? width2 : width1">
        <FMenu />
      </el-aside>
      <el-main style="padding: 4px 0 0">
        <FTagList />
        <router-view v-slot="{ Component }">
          <keep-alive :max="10">
            <component :is="Component" />
          </keep-alive>
        </router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<style lang="scss" scoped>
.el-aside {
  transition: all 0.2s;
}

// 关闭滚动条
.el-main::-webkit-scrollbar {
  width: 0px;
}
</style>
